﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CashierSystem.CashierInManager;
using CashierSystem.UserManager;

namespace CashierSystem.DoctorRecordManager
{
    public partial class NewDoctorRecordForm : Form
    {
        string customerId;
        User user;
        public NewDoctorRecordForm(string customerId,User user)
        {
            this.customerId = customerId;
            this.user = user;
            InitializeComponent();
        }

        private void NewDoctorRecordForm_Load(object sender, EventArgs e)
        {
            label6.Text = CashierInManager.CashierInManager.loadOneCustomerName(customerId);

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string treatContent = rtbTreatContent.Text;
            string times = tbTimes.Text;
            string doctorId = user.getAccount();
            DoctorRecordManager.saveTreatment(customerId, treatContent, times, doctorId);
            DialogResult response = MessageBox.Show("添加诊疗完成！");

        }
    }
}